<?php

namespace app\controller;

use think\helper\Str;

class Index extends Base
{

    public function initialize()
    {
        parent::initialize();
    }
    /**
     * 首页
     */
    public function index()
    {
        if (!session('userinfo.id') || !session("?userinfo")) {
            return redirect("login");
        }
        $view = [
            "app" => db('app','mysql')->order('sort desc')->select()->toArray(),
        ];
        return view('', $view);
    }

    /**
     * 登录
     */
    public function login()
    {
        return view();
    }
}
